import java.util.Scanner;

public class Exercise2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        // 1. 根据成绩给出等级
        System.out.println("请输入成绩（0-100）：");
        int score = scanner.nextInt();
        
        char grade;
        if (score >= 90 && score <= 100) {
            grade = 'A';
        } else if (score >= 80 && score < 90) {
            grade = 'B';
        } else if (score >= 70 && score < 80) {
            grade = 'C';
        } else if (score >= 60 && score < 70) {
            grade = 'D';
        } else if (score >= 0 && score < 60) {
            grade = 'F';
        } else {
            grade = 'X'; // 无效成绩
        }
        
        if (grade == 'X') {
            System.out.println("成绩无效，请输入0-100之间的数字");
        } else {
            System.out.println("成绩等级: " + grade);
        }
        
        // 2. 判断闰年
        System.out.println("\n请输入年份：");
        int year = scanner.nextInt();
        
        boolean isLeapYear = false;
        if (year % 4 == 0) {
            if (year % 100 != 0) {
                isLeapYear = true;
            } else if (year % 400 == 0) {
                isLeapYear = true;
            }
        }
        
        if (isLeapYear) {
            System.out.println(year + "年是闰年");
        } else {
            System.out.println(year + "年不是闰年");
        }
        
        scanner.close();
    }
}
